<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>疫苗种类信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
			$("#type").change(function(){
				$(this).next().text("");
			})
			$("#islive").change(function(){
				$(this).next().text("");
			})
			$("#status").change(function(){
				$(this).next().text("");
			})
			$("#inType").change(function(){
				$(this).next().text("");
			})
			
			$(document).on("blur","#gCode",function(){
				var tt = $(this).val();
				$("#pinyin").val(tt);
			});
		});
		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/vaccinate/bsVaccine/">疫苗种类信息列表</a></li>
		<li class="active"><a href="${ctx}/vaccinate/bsVaccine/form?id=${bsVaccine.id}">疫苗种类信息管理<shiro:hasPermission name="vaccinate:bsVaccine:edit">${not empty bsVaccine.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="vaccinate:bsVaccine:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="bsVaccine" action="${ctx}/vaccinate/bsVaccine/saveBatchno" method="post" class="form-horizontal">
		<form:hidden path="isNewRecord"/>
		<sys:message content="${message}"/>
		<div class="control-group">
			<label class="control-label">疫苗的编号:</label>
			<div class="controls">
				<form:input path="id" htmlEscape="false" maxlength="50" class="input-xlarge required" readonly="true"/>
				<span class="help-inline ids" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">大类编码:</label>
			<div class="controls">
				<form:input path="gNum" htmlEscape="false" maxlength="100" class="input-xlarge" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">大类名称:</label>
			<div class="controls">
				<form:input path="gName" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">大类英文名称:</label>
			<div class="controls">
				<form:input path="gCode" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">小类名称全称:</label>
			<div class="controls">
				<form:input path="nameAll" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">小类名称:</label>
			<div class="controls">
				<form:input path="name" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">小类英文名称:</label>
			<div class="controls">
				<form:input path="codeAll" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">疫苗类型：</label>
			<div class="controls">
				<form:select path="type" class="input-xlarge required">
					<form:option value="" label="--请选择--"/>
					<form:options items="${fns:getDictList('bs_vaccineInfo_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">疫苗活性：</label>
			<div class="controls">
				<form:select path="islive" class="input-xlarge required">
					<form:option value="" label="--请选择--"/>
					<form:options items="${fns:getDictList('bs_vaccineInfo_live')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否可用：</label>
			<div class="controls">
				<form:select path="status" class="input-xlarge required">
					<form:option value="" label="--请选择--"/>
					<form:options items="${fns:getDictList('bs_vaccinate_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">接种类型:</label>
			<div class="controls">
				<form:select path="intype" class="input-xlarge required">
					<form:option value="" label="--请选择--"/>
					<form:options items="${fns:getDictList('bs_vaccine_intype')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline" style="color:red"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">疫苗的英文简称:</label>
			<div class="controls">
				<form:input path="pinyin" htmlEscape="false" maxlength="200" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">排序:</label>
			<div class="controls">
				<form:input path="sort" htmlEscape="false" maxlength="100" class="input-xlarge "/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="vaccinate:bsVaccine:edit">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>